package com.x.reader.controller;

import com.x.framework.Base;
import com.x.framework.model.BaseView;
import com.x.reader.model.Paper;
import com.x.reader.service.PaperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Controller
@RestController
public class PaperController extends Base {

    @Autowired
    private PaperService paperService;

    @RequestMapping(value = "/SelectPaperList")
    public BaseView selectPaperList(Paper paper) {
        List<Paper> paperList = paperService.selectPaperList(paper);
        BaseView view = new BaseView(1);
        view.setResult(paperList);
        return view;
    }

}
